<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<import type="js" file="js.jquery" />
<import type="js" file="js.jquery#form" />
<import type="js" file="js.common" />
<import type="css" file="css.global" />
<import type="css" file="css.form" />
</head>
<body>
<form action="__APP__/Priv/purview_save" method="post" name="form1" >
<div class="search">
	<b>角色名称---{$priv_name}<input type="hidden" name="priv_id" value="{$priv_id}" ></b>
	<div class="tools">
		<input type="checkbox" name="checkid" onclick="if(this.checked==true) { checkAll('key[]'); } else { clearAll('key[]'); }" >
        <input type="hidden" name="priv_id" value="{$priv_id}" >
        <input type="submit" name="submit" class="submit" value="授权" >
        <input type="button" name="button" class="button" value="返回" onclick="back()">
	</div>
</div>
<script type="text/javascript">$(".search").smartFloat();</script>

<div class="list">
<table class="stripe" cellspacing="0">
    <tbody>
      <volist name="data_menu" id="vo">
        <tr>
            <td><b>{$vo.menu_name}</b></td>
            <td><input type="checkbox" name="key[]" value="{$vo.menu_id}" <php>if(in_array($vo['menu_id'], $purview)){ echo 'checked'; } </php> ></td>
        </tr>
        <volist name="vo.one" id="vo1">
        	<tr>
	            <td style="padding-left:30px;">{$vo1.menu_name}</td>
	            <td><input type="checkbox" name="key[]" value="{$vo1.menu_id}" <php>if(in_array($vo1['menu_id'], $purview)){ echo 'checked'; } </php> ></td>
	        </tr>
	        <volist name="vo1.second" id="vo2">
	        	<tr>
		            <td style="padding-left:60px;">{$vo2.menu_name}</td>
		            <td><input type="checkbox" name="key[]" value="{$vo2.menu_id}" <php>if(in_array($vo2['menu_id'], $purview)){ echo 'checked'; } </php> ></td>
		        </tr>
	        </volist>
        </volist>
      </volist>
    </tbody>
</table>
</div>
</form>
</body>
</html>
<script language="javascript">
$(document).ready(function(){  
	$(".stripe tr").mouseover(function(){    
	  $(this).addClass("over");}).mouseout(function(){   
			$(this).removeClass("over");}) 
  	$(".stripe tr:even").addClass("alt");
/*	
	$(".submit").click(function(){
		var key = '';
		$("[name='key[]']").each(function(){
			if($(this).attr("checked")){
				var key_val = $(this).val();
				key += key_val+',';
			}
		});
		alert(key);
		$.post("__APP__/Priv/purview_save");
		return false;
	});
*/
});   
</script>  